package com.norra.base.utils

import android.content.Context

class SizeUtil {
    companion object {
        fun dp2px(context: Context, dp: Float): Float {
            val scale = context.resources.displayMetrics.density
            return (dp * scale + 0.5f)
        }

        fun sp2px(context: Context, spValue: Float): Float {
            val fontScale = context.resources.displayMetrics.scaledDensity
            return (spValue * fontScale + 0.5f)
        }


    }
}